 <div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url()?>">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="<?=site_url('project')?>">项目管理</a><span class="crumb-step">&gt;</span><span>修改项目（<?=$res['p_name']?>）</span></div>
</div>
<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('project/operation')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                    <tr >
                        <th width="120"><i class="require-red">*</i>项目名称：</th>
                        <td>
                            <input class="common-text required" id="title" name="p_name" size="50" value="<?=$res['p_name']?>" type="text">
                            <span> 作为菜单名称，1-4个字符最佳</span>
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>项目单价：</th>
                        <td>
                            <input class="common-text" name="price" size="50" value="<?=$res['price']?>" type="text">
                            <span> 单品价格，必须为正整数</span>
                        </td>
                    </tr>
                    <tr>
                        <th width="120"><i class="require-red">*</i>状态：</th>
                        <td>
                            <select name="status" id="catid" class="required">
                                <option value="1">上线</option>
                                <option value="2" <?=$res['status'] == 2 ? 'selected' : '' ?>>不上线</option>
                            </select>
                            <span> 不上线则客户菜单不显示</span>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input type="hidden" name="id" value="<?=$res['id']?>">
                            <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        </td>
                    </tr>
                </tbody></table>
        </form>
    </div>
</div>

<script type="text/javascript">
    $('#myform').submit(function() {
        $(this).ajaxSubmit(function(data){
            if(data == 1){
                 layer.alert('修改成功！',{
                    icon:1,
                });
            }else{
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })

</script>